class CreateYoutubeDatas < ActiveRecord::Migration
  def self.up
    create_table :youtube_datas do |t|
      t.column :crawl_id, :integer
      
      t.column :first_name, :string
      t.column :last_name, :string
      t.column :age, :integer #ISO Country Code notaion
      t.column :gender, :string
      t.column :locale_country, :string #ISO Country Code notaion, take from location
      t.column :full_hometown, :string 
      t.column :occupation, :string
      
      t.column :last_update, :datetime
      
      #t.timestamps
    end
    add_index :youtube_datas, :crawl_id
  end
  
  def self.down
    remove_index :youtube_datas, :crawl_id
    drop_table :youtube_datas
  end
end
